/*
 * EquationOfState.cpp
 *
 *  Created on: 24 May 2011
 *      Author: allan
 */

#include "EquationOfState.h"

// C++ includes
using namespace std::placeholders;

// FluidReact includes
#include "NumericalUtilities.h"
//
//const double ConstantEquationOfStateFunction(double constantValue, double T, double P, const vector<double>& X)
//{
//	return constantValue;
//}
//
//const double NumericalMolarVolumePartialPressure(EquationOfState::Function molarVolume, double T, double P, const vector<double>& X)
//{
//	const double epsilon = 1.0E-06;
//	
//	return 0.5/epsilon * (molarVolume(T, P + epsilon, X) - molarVolume(T, P - epsilon, X));
//}
//
//EquationOfState::EquationOfState()
//{
//	SetMolarVolume(0.0);
//}
//
//EquationOfState::EquationOfState(double molarVolume)
//{
//	SetMolarVolume(molarVolume);
//}
//
//EquationOfState::EquationOfState(Function molarVolume)
//{
//	SetMolarVolume(molarVolume);
//}
//
//EquationOfState::EquationOfState(Function molarVolume, Function molarVolumePartialPressure)
//{
//	SetMolarVolume(molarVolume);
//	SetMolarVolumePartialPressure(molarVolumePartialPressure);
//}
//
//void EquationOfState::SetMolarVolume(double molarVolume)
//{
//	this->molarVolume = std::bind(ConstantEquationOfStateFunction, molarVolume, _1, _2, _3);
//	
//	this->molarVolumePartialPressure = std::bind(ConstantEquationOfStateFunction, 0.0, _1, _2, _3);
//}
//
//void EquationOfState::SetMolarVolume(Function molarVolume)
//{
//	this->molarVolume = molarVolume;
//	
//	this->molarVolumePartialPressure = std::bind(NumericalMolarVolumePartialPressure, molarVolume, _1, _2, _3);
//}
//
//void EquationOfState::SetMolarVolumePartialPressure(Function molarVolumePartialPressure)
//{
//	this->molarVolumePartialPressure = molarVolumePartialPressure;
//}
//
//const EquationOfState::Function EquationOfState::GetMolarVolume() const
//{
//	return molarVolume;
//}
//	
//const EquationOfState::Function EquationOfState::GetMolarVolumePartialPressure() const
//{
//	return molarVolumePartialPressure;
//}
//
//const double EquationOfState::MolarVolume(const PhaseState& phaseState) const
//{
//	return molarVolume(phaseState.T, phaseState.P, phaseState.molarFractions);
//}
//
//const double EquationOfState::MolarDensity(const PhaseState& phaseState) const
//{
//	return 1.0/molarVolume(phaseState.T, phaseState.P, phaseState.molarFractions);
//}
//
//const double EquationOfState::MolarVolumePartialPressure(const PhaseState& phaseState) const
//{
//	return molarVolumePartialPressure(phaseState.T, phaseState.P, phaseState.molarFractions);
//}
